home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / graphics / gnuplot / gnuplot-3.7.1src / gnuplot-3.7.1 / makefile.win < prev    next >
Makefile  |  1999-11-29  |  10KB  |  356 lines

  1. # make file øÄ
  2. 3.1 Windows version
  3. # and Win32 using Borland C++ 4 (or 5? --- 4.52 is known to work)
  4. # or Borland C++ Builder 1 (newer versions may work as well)
  5. #
  6. # This makefile may need some editing before it can be used. Check
  7. # BCC installation path, the WIN32 and RUNTIME_LIB flags, in particular.
  8. #
  9. # The compile and link includes debug flags.  Take them out if you
  10. # do not want them included  (-y -v -M, /m /s /v /l)
  11. #
  12. # New 991003: WIN32=1 build makes the helpers (doc2rtf, bf_test) as Win32
  13. #             console applications, instead of plain DOS programs. This
  14. #             way, it also works with those compilers missing a DOS option.
  15.  
  16. # where to place wgnuplot.hlp helpfile
  17. HELPFILE = wgnuplot.hlp
  18.  
  19. # location of Borland C compiler
  20. TC = d:\bc31
  21.  
  22. # location of TLINK.EXE and BCC.EXE
  23. BIN = $(TC)\bin\\
  24.  
  25. #The full path name of the help compiler. For BC++:
  26. HC = $(BIN)\hc
  27. # this comes with C++ Builder 1.0 (but doesn't seem to work):
  28. #HC = $(TC)\help\tools\hcw /c /e
  29. # or you can use the 'help workshop' available directly from MS:
  30. #HC = h:\mssdk\bin\hcw /c/e
  31.  
  32. # WIN32=1 for Win32s or Win32 (--> '95 or NT)
  33. # new: allow '-DWIN32=1' on make command line to take effect:
  34. !if "$(WIN32)"==""
  35. WIN32=0
  36. !endif
  37.  
  38. # Uncomment _this_ for BC++ 4.52 (or others that give linker errors for
  39. # the 'errno' variable)... :
  40. RUNTIME_LIBRARY=cw32.lib
  41.  
  42. # ... or this for more modern ones (like C++Builder 1.0) -- it's the
  43. # properly multithreading one:
  44. #RUNTIME_LIBRARY=cw32mt.lib
  45.  
  46. !if $(WIN32)
  47.  
  48. # 32bit Windows compilation.
  49. CC = bcc32
  50. PROCESSOR_OPT =
  51. DEFINE_HELPFILE = -DHELPFILE=\"$(HELPFILE)\"
  52.  
  53. # For BC++ 4.52, you may try this version with Pentium scheduling
  54. # optimization. NB: bcc32a in 4.52 increased in bugginess quite
  55. # a bit more than in program speed :-(
  56. #CC = bcc32a
  57. #PROCESSOR_OPT = -5
  58.  
  59. !else
  60.  
  61. # 16bit compilation:
  62. CC = bcc
  63. DEFINE_HELPFILE = -DHELPFILE="$(HELPFILE)"
  64.  
  65. !endif
  66.  
  67. # -c means don't link
  68. # -ml means use large model (large code, large data)
  69. # -M means produce link map
  70. # -y means include line numbers for debugger
  71. # -v means include debug info
  72. # -w- means ignore warnings and do not report them
  73. # -w-rvl ignore function must return a value error
  74. # -Ff=128 means make data object > 128 FAR
  75. # -W means window application
  76. # -DREADLINE to use the history/line editing capability. If you want this 
  77. #    capability add -DREADLINE to CFLAGS then add 'readline' to the /o
  78. #    section of the linker call.
  79. !if $(WIN32)
  80. CFLAGS = -c -W -M -G -y -v -w-rvl -w-use -w-par -w-aus -w-pro $(PROCESSOR_OPT) -I$(TC)\include -Iwin -DREADLINE=1 -DHAVE_STRNICMP -DWIN32 -DHAVE_STRERROR -DNO_GIH -DNOGAMMA -DWIN32_LEAN_AND_MEAN -DANSI_C -DHAVE_GETCWD
  81. CAUXFLAGS = -tWC -w-par -w-use -w-aus -f -N -M -y -v -d -I$(TC)\include -DWIN32 -DWINDOWS_NO_GUI -DHAVE_STRNICMP -DANSI_C
  82. !else
  83. CFLAGS = -c -W -ml -w-par -w-use -w-aus -f -h -N -M -y -v -d -Ff=32 -I$(TC)\include -Iwin -DREADLINE=1 -zEGPFAR_DATA -DHAVE_STRNICMP -DMSDOS=1 -DNO_GIH -DANSI_C -DHAVE_GETCWD -DNDEBUG
  84. CAUXFLAGS = -ml -w-par -w-use -w-aus -f -N -M -y -v -d -I$(TC)\include -DMSDOS=1 -DHAVE_STRNICMP -DANSI_C
  85. !endif
  86.  
  87. OBJS =     bitmap.obj command.obj contour.obj eval.obj graphics.obj graph3d.obj \
  88.     internal.obj misc.obj parse.obj plot.obj plot2d.obj plot3d.obj \
  89.     readline.obj scanner.obj set.obj show.obj specfun.obj standard.obj \
  90.     stdfn.obj term.obj util.obj version.obj binary.obj winmain.obj \
  91.     interpol.obj fit.obj matrix.obj datafile.obj alloc.obj util3d.obj \
  92.     hidden3d.obj time.obj help.obj
  93.  
  94. DLLOBJS = wgnuplib.obj wtext.obj wmenu.obj wpause.obj wgraph.obj wprinter.obj 
  95.  
  96. CSOURCE5 = term\aed.trm term\cgi.trm term\cgm.trm term\debug.trm \
  97.     term\dumb.trm term\dxy.trm \
  98.     term\eepic.trm term\epson.trm term\fig.trm term\hp26.trm \
  99.     term\hp2648.trm term\hpgl.trm term\hpljii.trm 
  100. CSOURCE6 = term\impcodes.h term\imagen.trm term\object.h \
  101.     term\iris4d.trm term\kyo.trm term\latex.trm term/pbm.trm term\win.trm
  102. CSOURCE7 = term\post.trm term\qms.trm term\regis.trm term\sun.trm \
  103.     term\t410x.trm term\tek.trm term\unixpc.trm term\unixplot.trm \
  104.     term\v384.trm term\x11.trm
  105. CSOURCE8 = contour.c specfun.c binary.c interpol.obj
  106. WINDOWS = makefile.win makefile.msw README.win win\wcommon.h \
  107.     win\wgnuplib.c win\wgnuplib.def win\wgnuplib.h win\wgnuplib.rc\
  108.     win\wgnuplot.def win\wgnuplot.hpj win\wgnuplot.mnu win\wgnuplot.rc \
  109.     win\wgraph.c win\winmain.c win\wmenu.c win\wpause.c \
  110.     win\wprinter.c win\wresourc.h win\wtext.c win\wtext.h \
  111.     win\geticon.c docs\doc2rtf.c term\win.trm win\wgnupl32.def
  112.  
  113. !if $(WIN32)
  114. all: wgnupl32.exe $(HELPFILE) wgnuplot.mnu demo\bf_test.exe
  115. !else
  116. all: wgnuplot.exe wgnuplot.dll $(HELPFILE) wgnuplot.mnu demo\bf_test.exe
  117. !endif
  118.  
  119. wgnuplot.exe: $(OBJS) win\wgnuplot.def win\wgnuplot.rc winmain.obj wgnuplot.lib
  120. #    $(BIN)tlink /Twe /c @&&!
  121.     $(BIN)tlink /Twe /c /s /v /l @&&!
  122. $(TC)\lib\C0Wl +
  123. bitmap command eval graphics graph3d help internal misc parse +
  124. plot plot2d plot3d scanner set show specfun standard stdfn term util version contour +
  125. binary interpol +
  126. winmain +
  127. readline +
  128. fit matrix datafile alloc util3d hidden3d time +
  129. ,wgnuplot,wgnuplot, +
  130. wgnuplot.lib +
  131. $(TC)\lib\import +
  132. $(TC)\lib\mathwl +
  133. $(TC)\lib\cwl, +
  134. win\wgnuplot.def
  135. !
  136.     $(BIN)brc -30 -k -i$(TC)\include win\wgnuplot.rc wgnuplot.exe
  137.  
  138. # gnuplot.opt contains a list of the 'core' files, in case that's of
  139. # any use...
  140.  
  141. wgnupl32.exe: $(OBJS) $(DLLOBJS) win\wgnupl32.def wgnupl32.res winmain.obj
  142. #    $(BIN)tlink32 /Tpe /c @&&!
  143.     $(BIN)tlink32 /Tpe /c /m /s /v @&&!
  144. $(TC)\lib\C0W32 +
  145. bitmap command eval graphics graph3d help internal misc parse +
  146. plot plot2d plot3d scanner set show specfun standard stdfn term util version contour +
  147. wgnuplib wtext wmenu wpause wgraph wprinter +
  148. binary interpol +
  149. winmain +
  150. readline +
  151. fit matrix datafile alloc util3d hidden3d time +
  152. ,wgnupl32,wgnupl32, +
  153. $(TC)\lib\import32 +
  154. $(TC)\lib\$(RUNTIME_LIBRARY), +
  155. win\wgnupl32.def, wgnupl32.res
  156. !
  157.  
  158. wgnupl32.res: win\wgnuplot.rc win\wgnuplib.rc
  159.     $(BIN)brcc32 -DWIN32 -i$(TC)\include -r -fowgnupl32 win\wgnuplot.rc
  160.  
  161. # default rules
  162.  
  163. .c.obj:
  164.     $(BIN)$(CC) @&&!
  165. $(CFLAGS)
  166. ! $<
  167.  
  168. # rules
  169.  
  170. bitmap.obj: bitmap.c bitmap.h plot.h
  171.  
  172. command.obj: command.c plot.h setshow.h fit.h
  173.         $(BIN)$(CC) $(DEFINE_HELPFILE) @&&!
  174. $(CFLAGS)
  175. ! command.c
  176.  
  177. contour.obj: contour.c plot.h
  178.  
  179. eval.obj: eval.c plot.h
  180.  
  181. graphics.obj: graphics.c plot.h setshow.h
  182.  
  183. graph3d.obj: graphics.c plot.h setshow.h
  184.  
  185. fit.obj: fit.c fit.h matrix.h plot.h
  186.  
  187. matrix.obj: matrix.c matrix.h fit.h
  188.  
  189. internal.obj: internal.c plot.h
  190.  
  191. misc.obj: misc.c plot.h setshow.h 
  192.  
  193. parse.obj: parse.c plot.h
  194.     $(BIN)$(CC) @&&!
  195. $(CFLAGS)
  196. ! parse.c
  197.  
  198. plot.obj: plot.c plot.h setshow.h
  199.     $(BIN)$(CC) @&&!
  200. $(CFLAGS)
  201. ! plot.c
  202.  
  203. hidden3d.obj: hidden3d.c plot.h setshow.h
  204.  
  205. plot3d.obj: plot3d.c plot.h setshow.h
  206.  
  207. plot2d.obj: plot2d.c plot.h setshow.h
  208.  
  209. readline.obj: readline.c plot.h
  210.  
  211. scanner.obj: scanner.c plot.h
  212.  
  213. set.obj: set.c plot.h setshow.h
  214.  
  215. show.obj: show.c plot.h setshow.h
  216.         $(BIN)$(CC) $(DEFINE_HELPFILE) @&&!
  217. $(CFLAGS)
  218. ! show.c
  219.  
  220. specfun.obj: specfun.c
  221.  
  222. standard.obj: standard.c plot.h
  223.  
  224. stdfn.obj: stdfn.c stdfn.h
  225.  
  226. interpol.obj: interpol.c plot.h setshow.h
  227.  
  228. term.obj: term.c term.h plot.h set.c show.c bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7) win\wgnuplib.h
  229.     $(BIN)$(CC) @&&!
  230. $(CFLAGS)
  231. ! $(TERMFLAGS) -Iterm -I. term.c
  232.  
  233. util.obj: util.c plot.h
  234.  
  235. util3d.obj: util3d.c plot.h setshow.h
  236.  
  237. version.obj: version.c
  238.  
  239. winmain.obj: win\winmain.c win\wgnuplib.h win\wtext.h plot.h
  240.         $(BIN)$(CC) $(DEFINE_HELPFILE) @&&!
  241. $(CFLAGS)
  242. ! win\winmain.c
  243.  
  244. wgnuplot.mnu: win\wgnuplot.mnu
  245.     copy win\wgnuplot.mnu wgnuplot.mnu
  246.  
  247.  
  248. # different compiler options for DLL's */
  249. !if $(WIN32)
  250. DLLCC = $(BIN)$(CC) -DWIN32 -c -M -y -v -WE -I$(TC)\include -Iwin
  251. !else
  252. DLLCC = $(BIN)$(CC) -c -WD -ms! -w-par -f -M -y -v -w -N -I$(TC)\include -Iwin
  253. !endif
  254.  
  255. wgnuplot.lib: wgnuplot.dll
  256.     $(BIN)implib wgnuplot.lib wgnuplot.dll
  257.  
  258. wgnuplot.dll: $(DLLOBJS) win/wgnuplib.def win/wgnuplib.rc
  259.     $(BIN)tlink /c /n /Twd /L$(TC)\lib /m /s /v /l @&&!
  260. c0ds +
  261. wgnuplib wtext wmenu wpause wgraph wprinter, +
  262. wgnuplot.dll, +
  263. wgnuplib.map, +
  264. import mathws cws, +
  265. win\wgnuplib.def
  266. !
  267.     $(BIN)brc -30 -i$(TC)\include -t win\wgnuplib.rc wgnuplot.dll
  268.  
  269. wgnuplib.obj: win/wgnuplib.c win/wgnuplib.h win/wcommon.h win/wresourc.h
  270.     $(DLLCC) win/wgnuplib.c
  271.     
  272. wmenu.obj: win/wmenu.c win/wgnuplib.h win/wcommon.h win/wresourc.h
  273.     $(DLLCC) win/wmenu.c
  274.  
  275. wtext.obj: win/wtext.c win/wgnuplib.h win/wcommon.h win/wresourc.h
  276.     $(DLLCC) win/wtext.c
  277.     
  278. wpause.obj: win/wpause.c win/wgnuplib.h win/wcommon.h win/wresourc.h
  279.     $(DLLCC) win/wpause.c
  280.     
  281. wprinter.obj: win/wprinter.c win/wgnuplib.h win/wcommon.h win/wresourc.h
  282.     $(DLLCC) win/wprinter.c
  283.     
  284. wgraph.obj: win/wgraph.c win/wgnuplib.h win/wcommon.h win/wresourc.h
  285.     $(DLLCC) win/wgraph.c
  286.     
  287. # convert gnuplot.doc to gnuplot.rtf
  288. $(HELPFILE): win\gnuplot.rtf
  289.     $(HC) win\wgnuplot.hpj
  290.  
  291. win\gnuplot.rtf: doc2rtf.exe docs\gnuplot.doc win\wgnuplot.hpj
  292.     doc2rtf docs\gnuplot.doc win\gnuplot.rtf
  293.  
  294. doc2rtf.exe: docs\doc2rtf.c docs\termdoc.c docs\xref.c $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
  295.     $(BIN)$(CC) -edoc2rtf.exe @&&!
  296. -D_Windows
  297. -w-pro
  298. $(CAUXFLAGS)
  299. -I. -Iterm -Idocs
  300. ! docs\doc2rtf.c docs\termdoc.c docs\xref.c
  301.  
  302. # make binary demo files
  303. demo\bf_test.exe: bf_test.c dbinary.obj dalloc.obj
  304.     $(BIN)$(CC) -edemo\bf_test.exe @&&!
  305. $(CAUXFLAGS)
  306. -L$(TC)\lib
  307. ! bf_test.c dbinary.obj dalloc.obj
  308.     cd demo
  309.     bf_test
  310.     cd ..
  311.  
  312. dalloc.obj: alloc.c
  313.     $(BIN)$(CC) -c @&&!
  314. $(CAUXFLAGS)
  315. ! -odalloc.obj alloc.c
  316.  
  317. dbinary.obj: binary.c
  318.     $(BIN)$(CC) -c @&&!
  319. $(CAUXFLAGS)
  320. ! -odbinary.obj binary.c
  321.  
  322. # clean up temporary files
  323. clean:
  324.     del *.obj
  325.     del win\*.obj
  326.     del wgnuplot.map
  327.     del win\wgnuplot.res
  328.     del wgnupl32.map
  329.     del wgnupl32.res
  330.     del win\gnuplot.rtf
  331.     del doc2rtf.map
  332.     del doc2rtf.exe
  333.     del win\wgnuplib.res
  334.     del wgnuplib.map
  335.     del wgnuplot.lib
  336.     del bf_test.map
  337.     del demo\bf_test.map
  338.     del demo\bf_test.exe
  339.     
  340. realclean: veryclean
  341.  
  342. veryclean: clean
  343.     del wgnuplot.exe
  344.     del wgnuplot.hlp
  345.     del win\wgnuplot.hlp
  346.     -attrib -h wgnuplot.gid
  347.     del wgnuplot.gid
  348.     del wgnuplot.mnu
  349.     del wgnuplot.dll
  350.     del wgnupl32.exe
  351.     del demo\binary1
  352.     del demo\binary2
  353.     del demo\binary3
  354.     del demo\fit.log
  355.     del demo\soundfit.par
  356.